package com.example.demoamqp.receiver;

import cn.hutool.core.date.DateUtil;
import com.example.demoamqp.conatants.Constants;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * 死信队列消费者
 * @className: MqDelayReceiver
 * @projectName: demo-one
 * @auth: rosszhang
 * @date: 2023/12/28 16:53
 */
@Slf4j
@Component
public class MqDelayReceiver {
    @RabbitListener(queues = Constants.MQ_DELAY_QUEUE)
    public void delayConsume(String msg) {
        log.debug("[消费者消费信息:{},时间:{}", msg, DateUtil.date());
    }

}
